<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>店铺设置</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="mx-auto max-w-[393px] h-[852px] bg-white relative overflow-hidden rounded-[40px] shadow-2xl">
        <!-- Status Bar -->
        <div class="bg-white px-6 pt-3 pb-2">
            <div class="flex justify-between items-center text-xs">
                <span class="font-semibold">9:41</span>
                <div class="flex space-x-1">
                    <i class="fas fa-signal"></i>
                    <i class="fas fa-wifi"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>
        </div>

        <!-- Header -->
        <div class="bg-gradient-to-r from-gray-500 to-gray-600 px-4 py-3">
            <div class="flex items-center justify-between text-white">
                <a href="home-b2c.html" class="text-white">
                    <i class="fas fa-arrow-left text-lg"></i>
                </a>
                <h1 class="text-lg font-semibold">店铺设置</h1>
                <button onclick="saveSettings()" class="text-white hover:opacity-80">
                    <i class="fas fa-save text-lg"></i>
                </button>
            </div>
        </div>

        <!-- Content -->
        <div class="h-[calc(852px-120px)] overflow-y-auto pb-24">
            <!-- Store Profile -->
            <div class="bg-white border-b border-gray-200">
                <div class="px-4 py-4">
                    <h3 class="font-semibold mb-4 flex items-center">
                        <i class="fas fa-store text-blue-600 mr-2"></i>
                        店铺信息
                    </h3>
                    
                    <!-- Store Logo -->
                    <div class="mb-4">
                        <label class="block text-sm font-medium text-gray-700 mb-2">店铺头像</label>
                        <div class="flex items-center space-x-3">
                            <div class="w-16 h-16 bg-gray-200 rounded-lg flex items-center justify-center">
                                <i class="fas fa-store text-gray-400 text-xl"></i>
                            </div>
                            <button onclick="uploadLogo()" class="bg-blue-100 text-blue-600 px-4 py-2 rounded-lg text-sm hover:bg-blue-200 transition-colors">
                                <i class="fas fa-camera mr-1"></i>更换头像
                            </button>
                        </div>
                    </div>
                    
                    <!-- Store Name -->
                    <div class="mb-4">
                        <label class="block text-sm font-medium text-gray-700 mb-2">店铺名称</label>
                        <input type="text" id="storeName" value="优质商品专营店" 
                               class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                    </div>
                    
                    <!-- Store Description -->
                    <div class="mb-4">
                        <label class="block text-sm font-medium text-gray-700 mb-2">店铺简介</label>
                        <textarea id="storeDescription" rows="3" 
                                  class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none">专注优质商品，为您提供最好的购物体验</textarea>
                    </div>
                    
                    <!-- Contact Info -->
                    <div class="grid grid-cols-2 gap-3">
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-2">联系电话</label>
                            <input type="tel" id="contactPhone" value="400-888-8888" 
                                   class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-2">客服QQ</label>
                            <input type="text" id="customerQQ" value="88888888" 
                                   class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                    </div>
                </div>
            </div>

            <!-- Business Settings -->
            <div class="bg-white border-b border-gray-200">
                <div class="px-4 py-4">
                    <h3 class="font-semibold mb-4 flex items-center">
                        <i class="fas fa-cog text-green-600 mr-2"></i>
                        营业设置
                    </h3>
                    
                    <!-- Business Hours -->
                    <div class="mb-4">
                        <label class="block text-sm font-medium text-gray-700 mb-2">营业时间</label>
                        <div class="grid grid-cols-2 gap-3">
                            <input type="time" id="openTime" value="09:00" 
                                   class="px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                            <input type="time" id="closeTime" value="22:00" 
                                   class="px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                    </div>
                    
                    <!-- Auto Reply -->
                    <div class="mb-4">
                        <label class="block text-sm font-medium text-gray-700 mb-2">自动回复</label>
                        <div class="space-y-2">
                            <label class="flex items-center">
                                <input type="checkbox" id="autoReply" checked class="mr-2">
                                <span class="text-sm text-gray-700">开启自动回复</span>
                            </label>
                            <textarea id="autoReplyMessage" placeholder="请输入自动回复内容" rows="2"
                                      class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none text-sm">您好，欢迎光临本店！我们会尽快为您服务</textarea>
                        </div>
                    </div>
                    
                    <!-- Delivery Settings -->
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-2">配送设置</label>
                        <div class="space-y-2">
                            <label class="flex items-center">
                                <input type="checkbox" id="freeShipping" checked class="mr-2">
                                <span class="text-sm text-gray-700">满额包邮（满¥99包邮）</span>
                            </label>
                            <label class="flex items-center">
                                <input type="checkbox" id="sameDayDelivery" class="mr-2">
                                <span class="text-sm text-gray-700">当日达服务</span>
                            </label>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Notification Settings -->
            <div class="bg-white border-b border-gray-200">
                <div class="px-4 py-4">
                    <h3 class="font-semibold mb-4 flex items-center">
                        <i class="fas fa-bell text-orange-600 mr-2"></i>
                        通知设置
                    </h3>
                    
                    <div class="space-y-3">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-sm font-medium text-gray-800">新订单提醒</p>
                                <p class="text-xs text-gray-500">有新订单时推送通知</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-sm font-medium text-gray-800">评价提醒</p>
                                <p class="text-xs text-gray-500">收到新评价时推送通知</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-sm font-medium text-gray-800">库存预警</p>
                                <p class="text-xs text-gray-500">商品库存不足时提醒</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" class="sr-only peer">
                                <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-sm font-medium text-gray-800">营销推送</p>
                                <p class="text-xs text-gray-500">平台活动和优惠信息</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Security Settings -->
            <div class="bg-white border-b border-gray-200">
                <div class="px-4 py-4">
                    <h3 class="font-semibold mb-4 flex items-center">
                        <i class="fas fa-shield-alt text-red-600 mr-2"></i>
                        安全设置
                    </h3>
                    
                    <div class="space-y-3">
                        <button onclick="changePassword()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-key text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">修改密码</p>
                                        <p class="text-xs text-gray-500">定期更换密码保障账户安全</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                        
                        <button onclick="bindPhone()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-mobile-alt text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">绑定手机</p>
                                        <p class="text-xs text-gray-500">已绑定: 138****8888</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                        
                        <button onclick="bindEmail()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-envelope text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">绑定邮箱</p>
                                        <p class="text-xs text-gray-500">已绑定: mer****@example.com</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                    </div>
                </div>
            </div>

            <!-- Advanced Settings -->
            <div class="bg-white">
                <div class="px-4 py-4">
                    <h3 class="font-semibold mb-4 flex items-center">
                        <i class="fas fa-wrench text-purple-600 mr-2"></i>
                        高级设置
                    </h3>
                    
                    <div class="space-y-3">
                        <button onclick="manageCategories()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-tags text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">商品分类管理</p>
                                        <p class="text-xs text-gray-500">设置店铺商品分类</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                        
                        <button onclick="templateSettings()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-palette text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">店铺装修</p>
                                        <p class="text-xs text-gray-500">自定义店铺页面样式</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                        
                        <button onclick="dataExport()" class="w-full text-left p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-download text-gray-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium">数据导出</p>
                                        <p class="text-xs text-gray-500">导出订单、商品等数据</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                        
                        <button onclick="accountLogout()" class="w-full text-left p-3 border border-red-200 rounded-lg hover:bg-red-50 transition-colors">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <i class="fas fa-sign-out-alt text-red-500 mr-3"></i>
                                    <div>
                                        <p class="text-sm font-medium text-red-600">退出登录</p>
                                        <p class="text-xs text-gray-500">退出当前商家账户</p>
                                    </div>
                                </div>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </button>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <script>
        // Store settings functions
        function uploadLogo() {
            showToast('正在打开相册...');
            setTimeout(() => {
                showToast('功能开发中，敬请期待');
            }, 1000);
        }

        function saveSettings() {
            const settings = {
                storeName: document.getElementById('storeName').value,
                storeDescription: document.getElementById('storeDescription').value,
                contactPhone: document.getElementById('contactPhone').value,
                customerQQ: document.getElementById('customerQQ').value,
                openTime: document.getElementById('openTime').value,
                closeTime: document.getElementById('closeTime').value,
                autoReply: document.getElementById('autoReply').checked,
                autoReplyMessage: document.getElementById('autoReplyMessage').value,
                freeShipping: document.getElementById('freeShipping').checked,
                sameDayDelivery: document.getElementById('sameDayDelivery').checked
            };

            showToast('正在保存设置...');
            
            // 模拟保存过程
            setTimeout(() => {
                showToast('设置保存成功！');
            }, 1500);
        }

        // Security functions
        function changePassword() {
            if (confirm('修改密码\n\n为了您的账户安全，建议定期更换密码。\n\n确认要修改密码吗？')) {
                showToast('正在跳转到密码修改页面...');
                setTimeout(() => {
                    showToast('功能开发中，敬请期待');
                }, 1500);
            }
        }

        function bindPhone() {
            showToast('正在跳转到手机绑定页面...');
            setTimeout(() => {
                showToast('功能开发中，敬请期待');
            }, 1000);
        }

        function bindEmail() {
            showToast('正在跳转到邮箱绑定页面...');
            setTimeout(() => {
                showToast('功能开发中，敬请期待');
            }, 1000);
        }

        // Advanced settings functions
        function manageCategories() {
            showToast('正在跳转到分类管理页面...');
            setTimeout(() => {
                showToast('功能开发中，敬请期待');
            }, 1000);
        }

        function templateSettings() {
            showToast('正在跳转到店铺装修页面...');
            setTimeout(() => {
                showToast('功能开发中，敬请期待');
            }, 1000);
        }

        function dataExport() {
            const options = ['订单数据', '商品数据', '客户数据', '财务数据'];
            const choice = prompt(`请选择要导出的数据类型：\n\n1. ${options[0]}\n2. ${options[1]}\n3. ${options[2]}\n4. ${options[3]}\n\n请输入序号 (1-4):`);
            
            if (choice >= 1 && choice <= 4) {
                showToast(`正在导出${options[choice - 1]}...`);
                setTimeout(() => {
                    showToast('功能开发中，敬请期待');
                }, 1500);
            }
        }

        function accountLogout() {
            if (confirm('确认退出登录？\n\n退出后需要重新登录才能访问商家功能。')) {
                showToast('正在退出登录...');
                setTimeout(() => {
                    // 实际应用中会跳转到登录页面
                    window.location.href = 'login.html';
                }, 1500);
            }
        }

        // Toast notification
        function showToast(message) {
            const toast = document.createElement('div');
            toast.className = 'fixed top-20 left-1/2 transform -translate-x-1/2 bg-gray-800 text-white px-4 py-2 rounded-lg text-sm z-50';
            toast.textContent = message;
            document.body.appendChild(toast);
            
            setTimeout(() => {
                toast.remove();
            }, 2000);
        }

        // Initialize page
        document.addEventListener('DOMContentLoaded', function() {
            showToast('店铺设置页面已加载');
            
            // Auto-reply toggle handler
            document.getElementById('autoReply').addEventListener('change', function() {
                const messageTextarea = document.getElementById('autoReplyMessage');
                messageTextarea.disabled = !this.checked;
                messageTextarea.style.opacity = this.checked ? '1' : '0.5';
            });
        });
    </script>
</body>
</html>